Repository navigation
feat: say a translation fault on the answer as translationWarning, and guard three unguarded bundle builders - #38282
objectstack-fleet[bot] wants to merge 3 commits into
Conversation
…arded bundle builders An i18n service that resolves but cannot read its translations now leaves a trace on every answer it touches: the /meta list and by-name reads on both HTTP hosts, the MCP list_objects and describe_object tools on both bridges, and query_dataset carry an optional translationWarning naming the reason, present only on such a fault. The object save refuses 503 SERVICE_UNAVAILABLE instead of storing a body whose translated echoes it could not tell from typed text; the analytics option-label pass and the upload page serve the authored labels with one warn line. Claude-Session: https://claude.ai/code/session_01L6bhgVdouXCTCCcBVLaYW5 Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 7 package(s): 15 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 13 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 190 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 464d6b82cd225944f50a18f1cfa933dcae2dd3d2 && git checkout 464d6b82cd225944f50a18f1cfa933dcae2dd3d2
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 3ad3b415997e28d37e74cc50ea05af9fac7faeaf 2468a0c13d1c7b84b95a3b1fce142b3bd470f657 && git checkout -B drift-repro 3ad3b415997e28d37e74cc50ea05af9fac7faeaf && git merge --no-ff 2468a0c13d1c7b84b95a3b1fce142b3bd470f657
node scripts/docs-audit/affected-docs.mjs --json 3ad3b415997e28d37e74cc50ea05af9fac7faeaf
|
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Read: card #35707 (body, triage 7027843174, claim 7237696168, dev report 7238417187), the PR body, file list and net diff, the check-runs on this head, and the cited code on ① Derived judgments
② Semver level
The changeset says the refused save "names the reason". At the protocol throw it does; at the HTTP door it does not (S2). The changeset and the PR body both say the bundle's only reader is the object save; it has a second (S1). ③ Boundary flags
④ Design judgmentpackages/spec/src/api/protocol.zod.ts. Holds against its consumers. Both transports build the by-name body in packages/spec/src/ai/dataset-tools.zod.ts. Holds against the executor: Read doors and bridges (rest, runtime, mcp, service-analytics service-analytics packages/metadata-protocol/src/protocol-discovery-and-bases.ts: M1 (must-fix) — S1 (should-fix) — The docblock says the bundle's "one reader is the object SAVE". It has a third call site: S2 (should-fix) — The refusal's sentence does not reach an HTTP caller. The route error door withholds the prose of a declared 5xx unless the producer sets N1 (nit) — The Implemented-by: VERDICT: FAIL |
…e fixed warning sentences - The changeset declares `Metadata-protocol: added` and grades `@objectstack/spec` minor: the response schemas' new key moves the authorable-surface shards. - `registeredTranslationBundle` has two readers, the object save and the stored-metadata migration (preview and apply). Both are refused the same way on a translation fault; the docblock and the sentence name both, and a migration pin covers the two passes. - The refusal is declared (`refusal: true`) with one fixed sentence, so the HTTP caller reads it instead of the generic 5xx sentence; the i18n error rides as `cause` and is logged at warn. Pinned at the REST save route. - `translationWarning`, `list_datasets`' translation warning and its catalogue-unreadable warning are fixed sentences; the original error goes to the server log only (`DatasetToolsDeps.logger`, bound by `AnalyticsService.datasetTools`). Claude-Session: https://claude.ai/code/session_01L6bhgVdouXCTCCcBVLaYW5 Co-authored-by: Claude <noreply@anthropic.com>
The refusal is the REST door's own sentence for the same fault; the read's error rides as `cause` and goes to the server log through the dataset tools' logger, never into the answer. Claude-Session: https://claude.ai/code/session_01L6bhgVdouXCTCCcBVLaYW5 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Delta review against the round-1 record 7238485386 (FAIL at ① Derived judgmentsRound 1's judgments stand. The delta adds:
② Semver level
The changeset now names both catalog readers, the declared refusal and its sentence, the fixed sentences and the new optional ③ Boundary flags
④ Design judgmentM1: closed. The declaration reads S1: closed. The docblock of S2: closed. Fixed client-facing text, read across the whole net diff and not the delta alone: every sentence the diff puts on an answer or a refusal is a constant or is built from the request's own names only. That covers The read doors, the bridges and the two spec files are as round 1 judged them; the spec descriptions still describe what is served. No must-fix, no should-fix. N1 (nit) — unchanged: the Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-sales · session_01L6bhgVdouXCTCCcBVLaYW5 {
"issue": 35707,
"status": "done",
"branch": "claude/project-thread-w29ab7",
"pr": "https://github.com/objectstack-ai/objectstack/pull/38282",
"session": "session_01L6bhgVdouXCTCCcBVLaYW5",
"premise_still_valid": true,
"summary": "Rounds 2 and 3 on top of report 7238417187, answering contract review 7238485386 (delta PASS 7239581233). M1: Metadata-protocol: added and @objectstack/spec minor on the PR body and the changeset. S1: registeredTranslationBundle's two readers (object save; migrateStoredMetadata preview and apply) named in the docblock, the sentence and the changeset, with migration pins. S2: translationsUnreadableError is a declared refusal (refusal: true, 503 SERVICE_UNAVAILABLE) with one fixed sentence, the i18n error on cause and logged at warn; pinned at PUT /meta/object/:name over the real protocol. Seat ruling: every warning and refusal sentence the diff serves is fixed client-facing text (translationWarning via META_TRANSLATION_FAULT_WARNING; list_datasets' translation and catalogue warnings; query_dataset's 503 for a failed dataset read, the REST door's own sentence), original errors on cause and in the server log (DatasetToolsDeps.logger, optional, bound by AnalyticsService.datasetTools).",
"tests": "head 2468a0c1: rest meta-translation-fault-34993 + meta-save-translation-fault-35707 (new) + analytics-dataset-ai-tools-parity 13/13; objectql protocol-meta-effective-schema 31/31 (one fix: the migration control asserted a listed row, a canonical row is not listed); service-analytics dataset-tools 96 passed 10 skipped, picklist-dimension-label-i18n green; mcp stdio-data-bridge.dataset-locale + object-locale-34872 + mcp-dataset-tools 51/51 then 40/40 after round 3; runtime mcp-object-locale-34872 + mcp-dataset-tools-bridge + meta-list-projection-parity 1471/1471; turbo build and typecheck of rest, metadata-protocol, service-analytics, objectql, mcp, runtime exit 0.",
"gates": "dispatch-gates --commands: 136 derived; --ran with exit codes: 135 exit 0, 1 NOT-MEASURED exit 3 (check-plugin-teardown-shape --self-test: shallow clone), 0 UNRUN. Four gates first red on the new REST test, fixed in-PR: check:engine-double-contract (--write), check:objectql-double-limit, check:rest-log-spy-declared, check:test-source-alias. CI on head 2468a0c1: 64 success, 12 skipped, 0 failed; PR mergeable_state clean.",
"dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "1 — subscribe_pr_activity (not a GitHub write tool)",
"api_writes": "5 — relay pr_create, relay comment (report 7238417187), relay issue_patch x2 (PR body r2, r3), relay comment (this report)",
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": ["carrier: #38288 (seat-filed) — the cached by-name /meta read's validator does not move with what the translation step contributes"]
} |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA 席位核对 — ACCEPT · head 2468a0c · card #35707 · area s2-ai · 2026-11-28T13:28ZL1 checklist
Tier: L. Landing: ready and auto-merge in this stroke. |
Requested by Sales · project thread
Fixes #35707
Clause-②: yes (widening)
Metadata-protocol: added
维护者速读
What changes
① A whole-answer warning,
translationWarning. When the i18n service resolves but itsgetLocales/getTranslationsthrows, the shared translator (translationBundleOf,packages/rest/src/meta-item-read-gate.ts) already served the authored text and logged the fault. The answers now also carry one optional top-level string,translationWarning, holding one fixed sentence (META_TRANSLATION_FAULT_WARNING): "The translations could not be read, so labels and descriptions are served untranslated." The i18n error's own text goes to the server log only. It is present only on such a fault; an answer whose translations were read (including one that found no translation for the caller's locale) is byte for byte what it was. One key, no companion boolean (seat ruling on the claim, 7237696168).GET /meta/:type(REST server and runtime dispatcher)createMetaListAnswerstep 9: thetranslateListport takes an optionalreportTranslationFault, and the chain puts the sentence besideitemson the{ type, items }envelope. A bare-array list has no member to carry it and is answered as it came.GET /meta/:type/:name(both hosts)translateMetaEnvelope, the one place both hosts build the by-name body: besideitem.list_objects(HTTP and stdio bridges)DiagnosedObjectListing.translationWarning, rendered by the tool besideobjects(healthy and degraded branches).describe_object(both bridges)query_dataset(both bridges)loadDatasetsnow name the fault asDatasetToolSource.translationWarning; the executor serves it on the answer.warningstays the delegation narrowing's alone.list_datasetskeeps its shape: it still says the same fault aspartial+warning(the executor reads the renamed source member into the same warnings list), now in the same fixed sentence. Its warning when the dataset catalogue itself cannot be read is a fixed sentence too ("The dataset catalogue could not be read, so no dataset is listed."), with the error logged through the analytics service's logger (DatasetToolsDeps.logger, optional, bound byAnalyticsService.datasetTools).query_dataset's 503SERVICE_UNAVAILABLEwhen the dataset read fails is the REST door's own fixed sentence (The dataset "<name>" could not be resolved: the dataset read failed. This is a server-side fault, not a missing dataset.), the error oncauseand in the same log. All warning and refusal sentences use the platform's client-facing failure text; the original error is in the server log only.Spec:
GetMetaItemsResponseSchema,GetMetaItemResponseSchema(one shared description) andQueryDatasetOutputSchemagaintranslationWarning: z.string().min(1).optional(). No export added or removed; regeneratedcontent/docs/references/**andauthorable-surface/{ai,api}.json.② The three unguarded bundle builders. Reach measured first:
ProtocolDiscoveryAndBasesFacet.registeredTranslationBundle(packages/metadata-protocol): it has two readers, the object save (the translated-echo restore) and the stored-metadata migration (migrateStoredMetadata's translated-echo notices, read for every stored object row on the preview and the apply pass, reached from the REST route, the runtime dispatcher andos migrate meta). Answeringundefinedthere, as the read doors do, would store a Studio session's translated labels as the authored text, or count an echoed stored rowcanonical. It now refuses either 503SERVICE_UNAVAILABLE(translationsUnreadableError) and stores nothing; before, the raw i18n error escaped. The refusal is declared (refusal: true) with one fixed sentence, so the HTTP caller reads it rather than the generic 5xx one: "The translations could not be read, so a label a translated read served back cannot be told from one written by hand; nothing was saved or migrated. Retry once the translations can be read." The i18n error rides ascauseand is logged atwarnwhere it is caught (a declared refusal is not logged by the route doors). A dev-thread decision, listed here: fail closed, the rule the same facet's stored-row read already follows.buildTranslationBundleinservice-analyticsplugin.ts(select-option labels of a dataset dimension) andtranslationBundleOfinservice-storagerecord-file-access.ts(the upload page's labels): answer no bundle, so the labels are served as declared, and onewarnline names the reason (a functional degradation).③ The two test gaps from the card: a fault pin on the HTTP object-tools path, and the
mcpRequestHttpbranch that reads a host's already-parsedrequest.query.Tests
packages/rest/src/meta-translation-fault-34993.test.ts: list and by-name on a fault carrytranslationWarning, exactly the fixed sentence; the log line names the i18n error; the control carries none. The protocol double now answers the list in the{ type, items }envelope the real protocol answers.packages/runtime/src/domains/meta-list-projection-parity.test.ts: new top-level describe, both transports, list and by-name: 200, authored label, the same fixedtranslationWarningwith no i18n error text in the body; control translated with none.packages/runtime/src/domains/mcp-object-locale-34872.test.ts: ③ the fault pin (describe_object,listObjectsDiagnosed, both throwing reads: the fixed sentence, no i18n error text) plus control; ③ the parsed-query pin, whose URL namesfr-FRwhilerequest.querynameszh-CN, so an answer read from the URL cannot pass (control: the same request withoutqueryreads the URL).packages/mcp/src/stdio-data-bridge.object-locale-34872.test.ts: through the real tool layer,describe_objectandlist_objectscarry the fixedtranslationWarningon a fault, with no i18n error text, the control'slist_objectskeys are exactlyobjects,totalCount; a resolver that throws (no service) says nothing.packages/runtime/src/mcp-dataset-tools-bridge.test.tsandpackages/mcp/src/stdio-data-bridge.dataset-locale.test.ts:query_dataseton a fault carries the fixedtranslationWarning, and the controls carry none;list_datasets' faultwarningis now the same fixed sentence and neither answer contains the i18n error text.packages/objectql/src/protocol-meta-effective-schema.test.ts: an object save over throwing reads is refused as a declared 503SERVICE_UNAVAILABLErefusal with the fixed sentence, the i18n error oncause, and stores no row; the migration's preview and apply passes are refused the same way and leave the stored row untouched; controls save and list.packages/rest/src/meta-save-translation-fault-35707.test.ts(new), at the HTTP door over the real protocol:PUT /meta/object/:nameover throwing reads answers 503SERVICE_UNAVAILABLEwhoseerroris the fixed sentence (not the generic 5xx one), the body holds no i18n error text, the store is unchanged, and the server log has the error; control 200 and stored.packages/services/service-analytics/src/__tests__/dataset-tools.test.ts:list_datasetsover a catalogue read that throws answers the fixed sentence, no error text, and the logger gets the error;query_datasetover a dataset read that throws refuses 503 with the fixed sentence, no error text, the error ascauseand in the logger.packages/services/service-analytics/src/__tests__/picklist-dimension-label-i18n.test.tsandpackages/services/service-storage/src/record-file-access.integration.test.ts: a fault serves the authored labels and logs the reason.Verification
Read first:
translateMetaEnvelopeand step 9 ofcreateMetaListAnswerinpackages/rest/src/meta-item-read-gate.ts;registeredTranslationBundleinpackages/metadata-protocol/src/protocol-discovery-and-bases.ts(the one place a fault now refuses instead of degrading, for its two readers);describeForPrincipal/listObjectsDiagnosedinpackages/mcp/src/stdio-data-bridge.ts.Two-minute check:
pnpm --filter @objectstack/rest exec vitest run src/meta-translation-fault-34993.test.ts src/meta-save-translation-fault-35707.test.tsprints 6 passed: the fault reads carry the fixedtranslationWarning, and the save door answers 503 with the fixed sentence.runs
Head 2468a0c (three commits on origin/main 98bd8de). Round 2 answers contract review 7238485386 (M1, S1, S2); round 3 is the seat's one addition,
query_dataset's 503 sentence.Round 3 (2468a0c): service-analytics build + typecheck exit 0; service-analytics
dataset-tools96 passed, 10 skipped; restanalytics-dataset-ai-tools-parity7/7; mcpmcp-dataset-tools+stdio-data-bridge.dataset-locale40/40; runtimemcp-dataset-tools-bridge13/13; dispatch-gates 136 derived, 135 run exit 0, 1 NOT-MEASURED (teardown self-test, exit 3), 0 UNRUN.Round 2 (141dfb3):
pnpm turbo run buildover@objectstack/metadata-protocol,rest,service-analytics,mcp,runtimeand their closures: exit 0, 42/42.vitest run): restmeta-translation-fault-34993+meta-save-translation-fault-35707(new) +analytics-dataset-ai-tools-parity13/13; objectqlprotocol-meta-effective-schema31/31 after one fix (the migration control first asserted a listed row; a canonical row is not listed, so it now asserts both passes answer and leave the row untouched); service-analyticsdataset-tools+picklist-dimension-label-i18n132 passed, 10 skipped; mcpstdio-data-bridge.dataset-locale+stdio-data-bridge.object-locale-34872+mcp-dataset-tools51/51; runtimemcp-object-locale-34872+mcp-dataset-tools-bridge+meta-list-projection-parity1471/1471.pnpm turbo run typecheckfor rest, metadata-protocol, service-analytics, objectql, mcp, runtime: exit 0, 47/47.node scripts/pm/dispatch-gates.mjs --commandsthen--ran: 136 derived, 135 run exit 0, 1 NOT-MEASURED (node scripts/check-plugin-teardown-shape.mjs --self-test, exit 3, shallow clone, left to CI), 0 UNRUN. Four gates were red on the new REST test first and green after:check:engine-double-contract(ledger rewritten with--write),check:objectql-double-limit(the double applies the caller'slimit),check:rest-log-spy-declared(declaresOS_REST_LOG),check:test-source-alias(module-top@objectstack/objectqlimport).Check Changesetreads the PR's declaration, so it is measured on CI only.Round 1 (head c04c652): build, typecheck and the same test files green;
check:generatedregeneratedcontent/docs/references/**; dispatch-gates 127 derived, 123 run exit 0, 4 NOT-MEASURED, 0 UNRUN.Acceptance notes
main; not changed here; the seat files it as its own card.translationWarning(review N1, left as is); the member is self-describing and only appears on a fault.objectstack://objectsMCP resources (stdio) serve the authored text on a fault, without a warning: no resource body has a slot for one, and the card names the tools only.claude/project-thread-w29ab7, not the repo'sclaude/issue-<n>-…convention.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgVdouXCTCCcBVLaYW5